<?php
	function validateFile($file, $formats, $maxSize){
		if($file['size'] == 0 ){
			$aErrors[] = "empty file";
			return $aErrors;
		}
		$extension = '';
	}

	function validate(){
		global $aErrores;
		if(empty($_POST['product_name_1'])){
			$aErrores['product_name_1'] = 'Complete nombre 1';
		}
		if(empty($_POST['product_name_2'])){
			$aErrores['product_name_2'] = 'Complete nombre 2';
		}
		if(empty($_POST['product_title_1'])){
			$aErrores['product_title_1'] = 'Complete titulo 1';
		}
		if(empty($_POST['product_title_2'])){
			$aErrores['product_title_2'] = 'Complete titulo 2';
		}
		/*
		if(empty($_POST['product_subtitle_1'])){
			$aErrores['product_subtitle_1'] = 'Complete subtitulo 1';
		}
		if(empty($_POST['product_subtitle_2'])){
			$aErrores['product_subtitle_2'] = 'Complete subtitulo 2';
		}
		if(empty($_POST['product_description_1'])){
			$aErrores['product_description_1'] = 'Complete descripcion 1';
		}
		if(empty($_POST['product_description_2'])){
			$aErrores['product_description_2'] = 'Complete descripcion 2';
		}
		if(empty($_POST['product_description_1'])){
			$aErrores['product_description_1'] = 'Complete descripcion 1';
		}
		if(empty($_POST['product_description_2'])){
			$aErrores['product_description_2'] = 'Complete descripcion 2';
		}
		if( !$_GET['id'] &&  $_FILES['product_img']['size'] == 0 ){
			$aErrores['product_img'] = 'Debe seleccionar una imagen';
		}
		if( !$_GET['id'] && $_FILES['product_description_img_1']['size'] == 0 ){
			$aErrores['product_description_img_1'] = 'Debe seleccionar una imagen para descripcion 1';
		}
		if( !$_GET['id'] && $_FILES['product_description_img_2']['size'] == 0 ){
			$aErrores['product_description_img_2'] = 'Debe seleccionar una imagen para descripcion 2';
		}
		*/
		return empty($aErrores);
	}

?>